package com.mijie.homi.search.service.index;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;

public class cb24 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<Integer> li=new ArrayList<Integer>();
		 for(int i=0;i<100;i++)
		 {
			 li.add(i);
			 
		 }
		 int limit=25;
		 int offset=80;
		 int toindex=offset+limit;
			if(offset>=li.size())
			{
				offset=li.size()-1;
				toindex=offset;
			}else{
			if(toindex>li.size())
				toindex=li.size();
			}
		 List<Integer> li2=li.subList(offset, toindex);
		 String eventStrformat = JSONArray.fromObject(li2).toString(2);
			 
	 System.out.println(eventStrformat);

	}

}
